home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / comm / mail / Elevatetag.lha / ElevateTag.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-03-21  |  1.7 KB  |  76 lines

  1. /*$VER: ElevateTag.rexx 1.0 (21.3.98)
  2. **
  3. **  $Filename: Elevatetag.rexx $
  4. **  $Version: 1.0 $
  5. **  $Date: 21.3.98 $
  6. **  $Creation: 21.3.98 $
  7. **  (C) Copyright 1998-2000 Paul Compton
  8. **
  9. **  I found that on the odd occasion I thought of a tagline and wanted to
  10. **  add it to a tagline file, but couldn't be bothered to go to my text editor
  11. **  to add it, this solved the problem nicely.
  12. **  dead easy to use, Enter your default choice where you keep your tags here
  13. */
  14.  
  15. dtagdir = 'tags:'               /*Enter your default choice for directory*/
  16.  
  17. /* Enter your default choice of tagline files in that directory here*/
  18.  
  19. dtagfile = 'newtags'          /*Enter your default tagline file*/
  20.  
  21.  
  22.  
  23.  
  24.  
  25. /*-------------------change nothing else---------------------------*/
  26.  
  27.  
  28. NL = '0a'x
  29. bufferflush
  30. call addlib('rexxreqtools.library',0,-30,0)
  31.  
  32.  
  33. START:
  34. tagen = rtgetstring("Delete me & enter new tagline","Insert the tagline you wish to add:", "ElevateTag V1.0","_Add|_New|_Forget it" ,)
  35. ans=rtresult
  36.  
  37. Select
  38.    when ans = '1' then call ADDTAG
  39.    when ans = '2' then call REQCALL
  40.     otherwise;
  41. end
  42. exit
  43.  
  44. ADDTAG:
  45. dtagcomp = dtagdir''dtagfile
  46.  if exists(dtagcomp) then call insertag
  47. else        
  48.  call reqcall
  49. exit
  50.  
  51. REQCALL:
  52. dtagcomp = rtfilerequest(dtagdir,dtagfile , "Pick a file" , , "rtfi_buffer = true",nope)
  53.  if nope = 0 then exit
  54.  if exists(dtagcomp) then call insertag
  55. else
  56.  call open('sres',dtagcomp,'W')
  57.  close ('sres')
  58.  call insertag
  59. exit
  60.  
  61. INSERTAG:
  62. call OPEN('sres',dtagcomp,'A')
  63. call WRITELN('sres','%%')
  64. call WRITELN('sres',tagen)
  65. close('sres')
  66.  
  67. call rtezrequest("Tagline" || NL ||tagen ||NL|| "written to" ||NL||  dtagcomp , "OK", ,)
  68.  
  69. exit
  70.  
  71. NODIR:
  72. call rtezrequest("Please edit the file ElevateTag and insert your default directory and file"  , "OK", ,)
  73.  
  74.  
  75. exit
  76.